import request from "@/utils/request";

// 获取自定义公众号菜单
export function getMenuBar() {
  return request({
    url: '/enterprise/info/getMenuBar',
    method: 'get'
  })
}

// 获取 油企的 appId
export function getAppId(enterpriseId) {
  return request({
    url: `/enterprise/info/${enterpriseId}`
  })
}

// 修改菜单
export function addMenu(data) {
  return request({
    url: '/enterprise/info/updateMenuBar',
    method: 'post',
    data
  })
}

// 上传图片到微信
export function uploadWxImgDto (imgUrl) {
  return request({
    url: '/enterprise/info/uploadImgToWx',
    method: 'post',
    data: { imgUrl }
  })
}

// 拉取会员卡信息
export function getMemberCard () {
  return request({
    url: '/enterprise/info/getCardInfo',
    method: 'get',
  })
}

// 修改会员卡
export function updateCard(data) {
  return request({
    url:'/enterprise/info/updateCardInfo',
    method: 'post',
    data
  })
}

// 上传背景图片
export function bgPicUpload(backgroundPicUrl ) {
  return request({
    url: '/enterprise/info/backgroundPicUrl',
    method: 'get',
    params: {
      backgroundPicUrl
    }
  })
}
